<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/9/2
 * Time: 15:33
 */
namespace app\common\model;
use think\Model;
use think\Db;

class Wechat extends Model
{
    //微信小程序
    public function mini_config($header=''){
        if($header==''){
             $config = [
                'app_id'=>'wx02bbac15929b5234',
                'app_secret'=>'186cb18bf5df3436986435a145221c6a',
                'map_key'=>'SMRBZ-MQBKO-PR5WE-SVCFC-SBJBQ-TNFMQ',
                'uniacid' =>2,
                'wxkey'=>'18545005769shimengwangluo8888888',
                'mchid' => "1602321185",
            ];
        }else{
             $config = [
                'app_id'=>'wx70b624bc13e997d6',
                'app_secret'=>'3fb5db32479fe281f175fe46f7fba142',
                'map_key'=>'SMRBZ-MQBKO-PR5WE-SVCFC-SBJBQ-TNFMQ',
                'uniacid' =>4,
                'wxkey'=>'18545005769shimengwangluo8888888',
                'mchid' => "1602321185",
            ];
        }

        $config['title'] = "万道发展";
        return $config;
    }

    //随机订单号
    public function order_sn(){
        return date('YmdHis') . str_pad(mt_rand(1, 99999), 5, '0', STR_PAD_LEFT);
    }

    

}